Optimal. Leaf size=70 \[ \frac {3 \log (1+\sin (c+d x))}{a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\sin ^2(c+d x)}{2 a^2 d}+\frac {1}{d \left (a^2+a^2 \sin (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2912, 12, 45}
\begin {gather*} \frac {\sin ^2(c+d x)}{2 a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {1}{d \left (a^2 \sin (c+d x)+a^2\right )}+\frac {3 \log (\sin (c+d x)+1)}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 2912
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \sin ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {x^3}{a^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\text {Subst}\left (\int \frac {x^3}{(a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a^4 d}\\ &=\frac {\text {Subst}\left (\int \left (-2 a+x-\frac {a^3}{(a+x)^2}+\frac {3 a^2}{a+x}\right ) \, dx,x,a \sin (c+d x)\right )}{a^4 d}\\ &=\frac {3 \log (1+\sin (c+d x))}{a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\sin ^2(c+d x)}{2 a^2 d}+\frac {1}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 71, normalized size = 1.01 \begin {gather*} \frac {2+6 \log (1+\sin (c+d x))+(-4+6 \log (1+\sin (c+d x))) \sin (c+d x)-3 \sin ^2(c+d x)+\sin ^3(c+d x)}{2 a^2 d (1+\sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 48, normalized size = 0.69
method | result | size |
derivativedivides | \(\frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-2 \sin \left (d x +c \right )+\frac {1}{1+\sin \left (d x +c \right )}+3 \ln \left (1+\sin \left (d x +c \right )\right )}{d \,a^{2}}\) | \(48\) |
default | \(\frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-2 \sin \left (d x +c \right )+\frac {1}{1+\sin \left (d x +c \right )}+3 \ln \left (1+\sin \left (d x +c \right )\right )}{d \,a^{2}}\) | \(48\) |
risch | \(-\frac {3 i x}{a^{2}}+\frac {i {\mathrm e}^{i \left (d x +c \right )}}{d \,a^{2}}-\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{d \,a^{2}}-\frac {6 i c}{d \,a^{2}}+\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2}}+\frac {6 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,a^{2}}-\frac {\cos \left (2 d x +2 c \right )}{4 d \,a^{2}}\) | \(125\) |
norman | \(\frac {-\frac {12 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {12 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {26 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {26 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {6 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {38 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {38 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {46 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {46 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \,a^{2}}-\frac {3 \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) | \(265\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 59, normalized size = 0.84 \begin {gather*} \frac {\frac {2}{a^{2} \sin \left (d x + c\right ) + a^{2}} + \frac {\sin \left (d x + c\right )^{2} - 4 \, \sin \left (d x + c\right )}{a^{2}} + \frac {6 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 72, normalized size = 1.03 \begin {gather*} \frac {6 \, \cos \left (d x + c\right )^{2} + 12 \, {\left (\sin \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, \cos \left (d x + c\right )^{2} + 7\right )} \sin \left (d x + c\right ) - 3}{4 \, {\left (a^{2} d \sin \left (d x + c\right ) + a^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 170 vs.
\(2 (61) = 122\).
time = 0.71, size = 170, normalized size = 2.43 \begin {gather*} \begin {cases} \frac {6 \log {\left (\sin {\left (c + d x \right )} + 1 \right )} \sin {\left (c + d x \right )}}{2 a^{2} d \sin {\left (c + d x \right )} + 2 a^{2} d} + \frac {6 \log {\left (\sin {\left (c + d x \right )} + 1 \right )}}{2 a^{2} d \sin {\left (c + d x \right )} + 2 a^{2} d} + \frac {\sin ^{3}{\left (c + d x \right )}}{2 a^{2} d \sin {\left (c + d x \right )} + 2 a^{2} d} - \frac {3 \sin ^{2}{\left (c + d x \right )}}{2 a^{2} d \sin {\left (c + d x \right )} + 2 a^{2} d} + \frac {6}{2 a^{2} d \sin {\left (c + d x \right )} + 2 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \sin ^{3}{\left (c \right )} \cos {\left (c \right )}}{\left (a \sin {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 90, normalized size = 1.29 \begin {gather*} -\frac {\frac {{\left (a \sin \left (d x + c\right ) + a\right )}^{2} {\left (\frac {6 \, a}{a \sin \left (d x + c\right ) + a} - 1\right )}}{a^{4}} + \frac {6 \, \log \left (\frac {{\left | a \sin \left (d x + c\right ) + a \right |}}{{\left (a \sin \left (d x + c\right ) + a\right )}^{2} {\left | a \right |}}\right )}{a^{2}} - \frac {2}{{\left (a \sin \left (d x + c\right ) + a\right )} a}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.47, size = 59, normalized size = 0.84 \begin {gather*} \frac {\frac {1}{a^2\,\sin \left (c+d\,x\right )+a^2}+\frac {3\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{a^2}-\frac {2\,\sin \left (c+d\,x\right )}{a^2}+\frac {{\sin \left (c+d\,x\right )}^2}{2\,a^2}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________